home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 1694 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.5 KB

  1. Path: news.pix.za!usenet
  2. From: js000021@pixie.co.za (Smit JS)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Debugging C/C++ Programs Via Borland Debugger Utilities.
  5. Date: Fri, 12 Jan 1996 09:38:42 GMT
  6. Organization: PiX - Proxima information X-change
  7. Message-ID: <4d5obs$mu6@hawk.pix.za>
  8. References: <4crssu$4uj@netaxs.com>
  9. NNTP-Posting-Host: 196.23.60.109
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. rvaughn@pacsibm.org (RussellMania) wrote:
  13.  
  14. >Hello All,
  15.  
  16. >I am gaining some experience with Borland c/c++ and I can do some 
  17. >basic debugging with the step over/step through debug functions.
  18.  
  19. >These functions are fine, but I wonder if a function exists to step
  20. >through an program statement or expression on an operator by operator
  21. >basis (is this even possible?)
  22.  
  23. >TIA
  24. Hi,
  25. Partly,yes. For a statement like
  26. for(n=0;n<10;n++)dothis; simply split the line in the source:
  27. for(n=0;n<10;n++)
  28.    dothis;  and the debugger will jump from line to line when you
  29. press the key while executing the function.
  30. Also if you have a statement like:
  31. if(n)return 0; you cannot have a breakpoint on the return.
  32. If you split the line:
  33. if(n)
  34.  return 0; 
  35. now you can have a breakpoint on the return instead of every time it
  36. is tested. This works in TD2 and 3, I have no experience of later
  37. versions. 
  38. Also important is how to skip a statement. (Again in TD3)
  39. Put the cursor where you want to go.
  40. Then Alt VC to get the CPU screen.
  41. Then Control-N to jump to the new position.
  42. Then ALT-F3 to get rid of the CPU screen, and you have jumped.
  43. Regards
  44. Johan Smit
  45. js000021@pixie.co.za
  46.  
  47.  
  48.